The present invention relates generally to transaction handling in a computing system, and more specifically, to speculative branch handling for transaction abort.
A transaction is a set of operations that transforms data from one state to another. A transaction typically includes a section of program code or a set of program instructions. In a transactional memory system, concurrent transactions are speculatively executed, and changes to data that are performed by non-conflicting transactions may be committed after completion. A conflict may occur when two or more concurrent transactions access similar pieces of data, such as word, block, object, etc. from a memory, and at least one memory access is a write access. When a transaction completes, the architectural changes made by the transaction are validated, and if validation is successful, the changes are made permanent, and the transaction is referred to as a committed transaction. If a transaction cannot be committed due to conflicts, the transaction is aborted, and any changes made by the execution of the instructions in the transaction are rolled back. The aborted transaction may then be re-executed from the beginning until the transaction succeeds.
A transactional memory system can be implemented in the form of hardware or software, or a combination of both. Hardware transactional memory systems include modifications to the processors, caches, and bus protocols to support transactions. Software transactional memory system provides transactional memory semantics in a software runtime library.